Skip to content

Update create_threads.py - #15

Open
tauseef-a wants to merge 2 commits into
masterfrom
tauseef-a-patch-12
Open

Update create_threads.py#15
tauseef-a wants to merge 2 commits into
masterfrom
tauseef-a-patch-12

Conversation

@tauseef-a

Copy link
Copy Markdown
Owner

No description provided.

Comment thread scripts/create_threads.py
try:
print("Exception")
i=1/0
except:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears that you are generically passing an Exception object without performing any other operation on it. This may hide error conditions that can otherwise be quickly detected and addressed. We recommend that you catch a more specific exception. If the code must broadly catch all exceptions, consider logging the stack trace using the logging.exception() API. For example,

try:
    x = 1 / 0
except ZeroDivisionError as e:
    logging.exception('ZeroDivisionError: %s', e)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant